<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<script src="lib/easeljs-0.7.1.min.js" type="text/javascript"></script>
	<script src="lib/tweenjs-0.5.1.min.js" type="text/javascript"></script>
</head>
<body onload="init()">
	<canvas id="mycanvas" width="500px" height="400px" style="border:1px solid #ccc"></canvas>

</body>
</html>

<script type="text/javascript">
	var stage;
	function init() {
		stage = new createjs.Stage(document.getElementById('mycanvas'))
		createjs.Ticker.setFPS(60);
		createjs.Ticker.addEventListener('tick',function(){
			stage.update()
		})
		start()
	}

	function start() {
		var text = new createjs.Text("游戏结束！","20px Arial","#ff7700");
		text.textBaseline ="middle";
		text.textAlign = "center";
		text.x = stage.canvas.width/2;
		text.y = stage.canvas.height/2;
		stage.addChild(text)
		createjs.Tween.get(text).wait(1000).to({y:500,alpha:0.1},2000,createjs.Ease.quadOut) 
	}
</script>